A method of developing library in Vistual, in Studio
1 create a new C++ project
2 introduction in the stdfax.h header file generated in the DLL library file
#include "usb_relay_device.h"
#pragma comment (LIB, "usb_relay_device.lib")
3 copies of the usb_relay_device.dll to your application to generate directory
Two, the development of library functions using the method
The 1 call usb_relay_init () function to initialize
Call usb_relay_device_enumerate (2) find into all USB computer in the free flooding relay module
The 3 call usb_relay_device_open () to open you need to operate equipment; call usb_relay_device_open_with_serial_number () to open the specified sequence number equipment
4 other operations:
Call usb_relay_device_open_one_relay_channel () can open a way relay
Call usb_relay_device_open_all_relay_channel () can open all relay
Call usb_relay_device_close_one_relay_channel () can shut down a road relay
Call usb_relay_device_close_all_relay_channel () can close all relay
Release the memory 5 calls to usb_relay_device_free_enumerate
Release the memory 6 calls to usb_relay_exit